/* ================================
   0) Design tokens (variables)
   ================================ */
:root {
  --bg: #976841;

  /* Glass cards */
  --glass-bg: rgba(255, 255, 255, 0.12);
  --glass-border: rgba(255, 255, 255, 0.18);

  /* Text */
  --text: rgba(255, 255, 255, 0.92);
  --text-soft: rgba(255, 255, 255, 0.75);

  /* Layout + sizing */
  --container-max: 1400px;
  --container-pad-x: 48px;
  --container-pad-y: 48px;

  --radius-card: 18px;
  --radius-hero: 22px;

  --gap: 18px;

  /* Shadows */
  --shadow-card: 0 14px 30px rgba(0, 0, 0, 0.16);
  --shadow-hero: 0 18px 38px rgba(0, 0, 0, 0.2);
}

/* ================================
   1) Reset / base
   ================================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, sans-serif;
}

/* Images behave predictably */
img {
  max-width: 100%;
  display: block;
}

/* ================================
   2) Page layout
   ================================ */
.wrap {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: var(--container-pad-y) var(--container-pad-x);
}

/* ================================
   3) Header / Typography
   ================================ */
h1 {
  font-family: "Playfair Display", serif;
  font-size: clamp(42px, 6vw, 68px);
  margin: 0 0 8px;
  line-height: 1;
}

.subtitle {
  margin: 0;
  color: var(--text-soft);
}

/* ================================
   4) Intro section (image + text)
   NOTE: your HTML uses .hero-image inside .intro
   ================================ */
.intro {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 36px;
  align-items: center;
  margin: 40px 0 56px;
}

/* The image container inside the intro */
.intro .hero-image {
  position: relative;
  width: 320px;

  border-radius: var(--radius-hero);
  overflow: hidden;

  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-hero);
}

/* Optional overlay tint to blend with background */
.intro .hero-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(151, 104, 65, 0.15);
  pointer-events: none;
}

.intro .hero-image img {
  width: 100%;
  height: auto;
  object-fit: cover; /* nicer for portraits in a fixed-width box */
}

/* Text */
.intro-text h2 {
  margin: 0 0 12px;
  font-size: 25px;
}

.intro-text p {
  margin: 0 0 22px;
  color: var(--text-soft);
  line-height: 1.6;
  max-width: 850px;
}

/* Responsive intro */
@media (max-width: 768px) {
  .intro {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .intro .hero-image {
    width: 100%;
    max-width: 360px;
  }
}

/* ================================
   5) Grid + cards (Home boxes)
   ================================ */
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
  margin-top: 28px;

  /* Helps fill the page */
  min-height: calc(100vh - 220px);
}

.card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-card);
  padding: 18px;

  min-height: 160px;

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.2);
}

/* Wide cards (full width) */
.card--wide {
  grid-column: 1 / -1;
  min-height: 200px;
}

/* ================================
   6) Clickable cards (links)
   Fixes: one definition only + arrow doesn't clash with right icon
   ================================ */
.card--link {
  position: relative; /* needed for arrow + icon positioning */
  display: block;     /* makes the full card clickable */
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.card--link:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 255, 255, 0.35);
}

/* Keyboard accessibility */
.card--link:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.45);
  outline-offset: 4px;
}

/* Arrow indicator (bottom-right so it won't overlap icons) */
.card--link::after {
  content: "→";
  position: absolute;
  right: 18px;
  bottom: 18px;
  opacity: 0.7;
}

.card--link { 
  padding-right: 90px; /* makes space so text doesn't go under icon/arrow */
}

.card-icon-between {
  position: absolute;
  right: 54px;   /* icon sits just left of the arrow */
  bottom: 18px;  /* aligned with arrow */
  width: 28px;
  height: 28px;
  object-fit: contain;
  opacity: 0.9;
}

/* ================================
   7) Inner pages layout (aboutme.html, etc.)
   ================================ */
.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.back-link {
  color: var(--text-soft);
  text-decoration: none;
  font-weight: 500;
}

.back-link:hover {
  color: var(--text);
  text-decoration: underline;
}

.page {
  display: grid;
  gap: var(--gap);
}

.page-card h2 {
  margin: 0 0 10px;
}

.page-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text-soft);
}

.page-card p {
  margin: 0;
  color: var(--text-soft);
  line-height: 1.5;
}

/* ================================
   8) Responsive (global)
   ================================ */
@media (max-width: 640px) {
  .wrap {
    padding: 36px 20px;
  }

  .grid {
    grid-template-columns: 1fr;
    min-height: auto; /* avoids awkward tall empty space on mobile */
  }

  .card--wide {
    grid-column: auto;
  }
}

@media (min-width: 1024px) {
  /* Slightly larger intro image on bigger screens */
  .intro .hero-image {
    width: 360px;
  }
}



.coursework-list {
  columns: 2;              /* split into 2 columns */
  column-gap: 48px;        /* space between columns */
  margin-top: 12px;
}

.coursework-list li {
  break-inside: avoid;     /* prevents ugly splits */
  margin-bottom: 6px;
}

@media (max-width: 768px) {
  .coursework-list {
    columns: 1;
  }
}

